/*
 * @Author: deliteam 462085920@qq.com
 * @Date: 2022-12-14 17:15:08
 * @Description:
 */
import defaultSettings from '@/settings'
import i18n from '@/lang'

const title = defaultSettings.title || '集舍研造CMS管理系统'

export default function getPageTitle(key) {
  const hasKey = i18n.te(`route.${key}`)
  if (hasKey) {
    const pageName = i18n.t(`route.${key}`)
    return `${pageName} - ${title}`
  }
  return `${title}`
}
